package com.simtop.config.BaiduApi;

import com.baidu.aip.contentcensor.AipContentCensor;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;


/**
 * @author lvyongwei
 */
@Configuration
public class AipContentCensors {

    //设置APPID/AK/SK
    public static final String APP_ID = "25235641";
    public static final String API_KEY = "PsDNp67jb0wCEQ178UdWdi8H";
    public static final String SECRET_KEY = "wAmjqaisXReMmLKiTB2ibD0fTtnjesKW";

    @Bean
    public AipContentCensor aipContentCensor(){
        AipContentCensor client =  new AipContentCensor(APP_ID, API_KEY, SECRET_KEY);
        // 可选：设置网络连接参数B
        client.setConnectionTimeoutInMillis(60000);
        client.setSocketTimeoutInMillis(60000);
        return client;
    }
}
